$(function() {
    //修改密码
    $('.revise').on('click', () => {
        // console.log('--------');
        let par = {
            userPass: $('#old').val(),
            newPass: $('#password').val(),
            confirmPass: $('#confirm').val(),
        }
        $.ajax(baseUrl + '/users/password', {
            type: 'put',
            data: par,
            success: res => {
                console.log('请求成功', res);
                alert('已修改');
            },
            async: false,
            error: err => {
                console.log('错误：', err);
            }
        });
    });
})